package com.example.cdctravel

import android.annotation.SuppressLint
import android.app.Fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView

class NewContentFragment @SuppressLint("ValidFragment") internal constructor() : Fragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        val view = inflater.inflate(R.layout.fg_content, container, false)
        val txt_title = view.findViewById<View>(R.id.txt_title) as TextView
        val txt_content = view.findViewById<View>(R.id.txt_content) as TextView
        //getArgument获取传递过来的Bundle对象
        txt_title.text = arguments.getString("time")
        txt_content.text = arguments.getString("content")
        return view
    }
}
